<!--
 * @Author: hq
 * @Date: 2022-05-18 19:57:54
 * @LastEditors: hq
 * @LastEditTime: 2022-08-08 10:34:53
 * @Description: your project
 * @version: 1.0
-->
<template>
  <div class="shouye">
    <div class="welcome">
      <div class="title">首页</div>
      <div class="title1">欢迎您，{{ username }}</div>
    </div>
    <div class="company">
      <div class="row1">中科华控实业集团有限公司</div>
      <div class="row2">服务商编号：6666000116402247</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: "",
    };
  },
  mounted() {},
  methods: {
    initEcharts() {
      // 基本柱状图
      const option = {
        xAxis: {
          data: this.xData,
        },
        yAxis: {},
        series: [
          {
            type: "bar", //形状为柱状图
            data: this.yData,
          },
        ],
      };
      const myChart = echarts.init(document.getElementById("mychart"));
      myChart.setOption(option);
      //随着屏幕大小调节图表
      window.addEventListener("resize", () => {
        myChart.resize();
      });
    },
  },
  created() {
    this.username = sessionStorage.getItem("username");
  },
};
</script>

<style lang="scss" scoped>
.shouye {
  padding: 30px;
  box-sizing: border-box;
  .title {
    font-size: 26px;
    font-weight: bold;
  }
  .title1 {
    font-size: 24px;
    color: #999999;
    margin: 15px 0 40px;
  }
  .company {
    background-color: #fff;
    border-radius: 20px;
    margin-top: 20px;
    padding: 50px 0;
    box-sizing: border-box;
    .row1 {
      font-size: 26px;
      border-left: 6px solid #2978ff;
      padding-left: 40px;
      box-sizing: border-box;
      margin-bottom: 16px;
    }
    .row2 {
      font-size: 20px;
      padding-left: 46px;
      box-sizing: border-box;
      color: #999999;
    }
  }
}
</style>
